package com.atguigu.model;

import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 实体类跟集合进行映射
 * @author: atguigu
 * @create: 2023-11-24 10:54
 */
@Data
@Document(collection = "user")
public class MyUser {

    @Id
    private ObjectId id;
    private String name;
    private Integer age;
    private String email;
    private Date createDate;
}